/*
** list_split.c for liblist in /home/guina_b/
** 
** Made by benoit guina
** Login   <guina_b@epitech.net>
** 
** Started on  Fri Jan 01 00:00:00 2010 benoit guina
** Last update Fri Jan 01 00:00:00 2010 benoit guina
*/

#include "list.h"

void	*list_split(void **l, int n)
{
  void	**cur;
  void	*r;

  cur = l;
  while (n-- && *cur)
    cur = (void **)(*cur);
  r = *cur;
  *cur = 0;
  return (r);
}
